// 尽量用localStorage
// import Cookies from 'js-cookie'

// import Cookies from 'js-cookie'

// 设定一个独一无二的key
const TokenKey = 'sweetHouse-token'

const timeKey = 'sweetHouse-timestamp-key'

export function getToken() {
  return localStorage.getItem(TokenKey)
  // return Cookies.get(TokenKey)
}

export function setToken(token) {
  // return Cookies.set(TokenKey, token)
  return localStorage.setItem(TokenKey, token)
}TimeRanges

export function removeToken() {
  // return Cookies.remove(TokenKey)
  return localStorage.removeItem(TokenKey)
}

// 获取时间戳
export function getTimeStamp() {
  // return Cookies.get(timeKey)
  return localStorage.getItem(timeKey)
}

// 设置时间戳
export function setTimeStamp() {
  // Cookies.set(timeKey, Date.now())
  localStorage.setItem(timeKey, Date.now())
}
